<div class="container">
  {{!--TODO: Make into Component--}}
  <ul class="nacho-breadcrumbs">
    {{#each breadcrumbs as |crumb|}}
      <li class="nacho-breadcrumbs__crumb">
        {{link-to crumb.crumb "browse.entity" "flows" (query-params page=1 urn=crumb.urn name=crumb.name)
                  class="nacho-breadcrumbs__crumb__grain"}}
      </li>
    {{/each}}
  </ul>

  {{#dataset-table
    fields=model.data.jobs as |table|}}
    {{#table.head as |head|}}
      {{#head.column columnName="name"}}Job Path{{/head.column}}
      {{#head.column columnName="type"}}Job Type{{/head.column}}
      {{#head.column}}Creation Time{{/head.column}}
      {{#head.column}}Modified Time{{/head.column}}
    {{/table.head}}

    {{#table.body as |body|}}
      {{#each
        (sort-by table.sortBy table.data) as |job|}}
        {{#body.row as |row|}}
          {{#row.cell}}
            {{#if job.refFlowId}}
              {{#link-to 'flows.flow' job.refFlowId (query-params name=model.data.name)}}
                {{job.name}}
              {{/link-to}}
            {{else}}
              {{job.name}}
            {{/if}}
          {{/row.cell}}

          {{#row.cell}}
            {{job.type}}
          {{/row.cell}}

          {{#row.cell}}
            {{moment-calendar job.created sameElse="MMM Do YYYY, h:mm a"}}
          {{/row.cell}}

          {{#row.cell}}
            {{moment-calendar job.modified sameElse="MMM Do YYYY, h:mm a"}}
          {{/row.cell}}
        {{/body.row}}
      {{/each}}
    {{/table.body}}
  {{/dataset-table}}
</div>
{{outlet}}
